/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication19;

import java.sql.Time;
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author A
 */
public class Zegar implements Runnable {

    @Override
    public void run() {
        
        
        while(true){
            try {
                
                Time time = new Time(new Date().getTime());
                NewJFrame frame = new NewJFrame();
                Thread.sleep(1000);
                frame.setZegar(time);
            System.out.println("po imporcie");
            
            } catch (InterruptedException ex) {
                Logger.getLogger(Zegar.class.getName()).log(Level.SEVERE, null, ex);
            }
        
    }
    }
}
